package com.example.demo.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class Customer {
    private String identity; //身份证
    private String custname; //客户姓名
    private int sex; //性别
    private String address; //住址
    private String phone; //电话
    private String career; //职业
    @JsonFormat(pattern = "yyyy-mm-dd HH:mm:ss",timezone = "GMT-8") //返回json数据，设置年月日、时分秒，使用现在时间
    private Date createTime; //创建时间

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        //this.identity = identity;
        this.identity = identity == null ? null : identity.trim();//如果返回值为空，上传null
    }

    public String getCustname() {
        return custname;
    }

    public void setCustname(String custname) {
        //this.custname = custname;
        this.custname = custname == null ? null : custname.trim();
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        //this.address = address;
        this.address = address == null ? null : address.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        //this.phone = phone;
        this.phone = phone == null ? null : phone.trim();
    }

    public String getCareer() {
        return career;
    }

    public void setCareer(String career) {
        //this.career = career;
        this.career = career == null ? null : career.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Customer{" +
                "identity='" + identity + '\'' +
                ", custname='" + custname + '\'' +
                ", sex=" + sex +
                ", address='" + address + '\'' +
                ", phone='" + phone + '\'' +
                ", career='" + career + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
